package org.jeecg.modules.demo.drfReviewAssignments.service.impl;




import org.jeecg.modules.demo.drfpapers.entity.DrfPapers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.drfReviewAssignments.entity.DrfReviewAssignments;
import org.jeecg.modules.demo.drfReviewAssignments.mapper.DrfReviewAssignmentsMapper;
import org.jeecg.modules.demo.drfReviewAssignments.service.IDrfReviewAssignmentsService;

import java.util.List;

/**
 * @Description: 审核任务表
 * @Author: jeecg-boot
 * @Date:   2025-10-02
 * @Version: V1.0
 */
@Service
public class DrfReviewAssignmentsServiceImpl extends ServiceImpl<DrfReviewAssignmentsMapper, DrfReviewAssignments> implements IDrfReviewAssignmentsService {

    @Autowired
    private DrfReviewAssignmentsMapper drfReviewAssignmentsMapper;

    @Override
    public Integer getNeedReviewCount(String id) {
        return drfReviewAssignmentsMapper.getNeedReviewCount(id);
    }

    @Override
    public Integer getWaitingForReviewCount(String id) {
        return drfReviewAssignmentsMapper.getWaitingForReviewCount(id);
    }

    @Override
    public List<String> getNeedReviewPapers(String id) {
        return drfReviewAssignmentsMapper.getNeedReviewPapers(id);
    }


    @Override
    public Boolean updatePaperStatus(String id, String status, String userId) {

        return drfReviewAssignmentsMapper.updatePaperStatus(id, status, userId) > 0;
    }

    @Override
    public List<DrfPapers> getWaitingForReviewPapers(String userId) {

        return drfReviewAssignmentsMapper.getWaitingForReviewPapers(userId);
    }

    @Override
    public DrfReviewAssignments getByTeacherId(String userId) {

        return drfReviewAssignmentsMapper.getByTeacherId(userId);
    }

    @Override
    public Boolean updateStatus(String id, String userId ,String status) {

        return drfReviewAssignmentsMapper.updateStatus(id, userId ,status) > 0;
    }

    @Override
    public int getCountByPaperId(String id) {

        return drfReviewAssignmentsMapper.getCountByPaperId(id);
    }

    @Override
    public boolean getStatusCount(String paperId) {

        return drfReviewAssignmentsMapper.getStatusCount(paperId) > 0;
    }

    @Override
    public List<String> getNotAcceptPaper() {

        return drfReviewAssignmentsMapper.getNotAcceptPaper();
    }

    @Override
    public List<DrfReviewAssignments> getByPaperId(String id) {

        return drfReviewAssignmentsMapper.getByPaperId(id);
    }
}
